package com.jh.paymentchannel.payment;

import com.jh.paymentchannel.pojo.PaymentOrder;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author Yichuan
 * @version 1.0
 */
public class PaymentOrderDTO implements Serializable {

    private static final long serialVersionUID = 6793958837045615929L;

    public static PaymentOrderDTO order(PaymentOrder paymentOrder) {
        if (paymentOrder == null) {
            return null;
        }
        PaymentOrderDTO orderDTO = new PaymentOrderDTO();
        orderDTO.setOrderId(paymentOrder.getOrderId());
        orderDTO.setShopId(paymentOrder.getShopId());
        orderDTO.setShopName(paymentOrder.getShopName());
        orderDTO.setOutTradeNo(paymentOrder.getOutTradeNo());
        orderDTO.setTotalFee(paymentOrder.getTotalFee());
        orderDTO.setOrderType(paymentOrder.getOrderType());
        orderDTO.setTradeStatus(paymentOrder.getTradeStatus());
        return orderDTO;
    }

    private Long orderId;
    private String shopId;
    private String shopName;
    private String outTradeNo;
    private BigDecimal totalFee;
    private OrderType orderType;
    private TradeStatus tradeStatus;

    public PaymentOrderDTO() {
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public OrderType getOrderType() {
        return orderType;
    }

    public void setOrderType(OrderType orderType) {
        this.orderType = orderType;
    }

    public BigDecimal getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(BigDecimal totalFee) {
        this.totalFee = totalFee;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public TradeStatus getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(TradeStatus tradeStatus) {
        this.tradeStatus = tradeStatus;
    }
}
